﻿Imports System.Data.OleDb

Module moduleOrienteObjet
    Public categories As New ArrayList
    Public options As New ArrayList

    Sub actualiserCategories()

        Dim bd As New cls_GestionBD("taco.mdb")
        bd.daBd.SelectCommand = New OleDbCommand("SELECT * FROM tblCategories")
        bd.remplirDataSet("tbl")

        categories.Clear()

        For Each element As DataRow In bd.dsBd.Tables("tbl").Rows
            categories.Add(New clsCategorie(element))
        Next

    End Sub

    Sub actualiserOptions()
        Dim bd As New cls_GestionBD("taco.mdb")
        bd.daBd.SelectCommand = New OleDbCommand("SELECT * FROM tblOptions")
        bd.remplirDataSet("tbl")

        options.Clear()

        For Each element As DataRow In bd.dsBd.Tables("tbl").Rows
            options.Add(New clsOptions(element))
        Next
    End Sub


End Module
